#ifndef LASERCONTROL_BASE_H
#define LASERCONTROL_BASE_H

#include <QObject>
#include <global_defines.h>

class LaserControlBase : public QObject
{
    Q_OBJECT
public:
    explicit LaserControlBase(QObject *parent = nullptr);
    virtual void OpenLaser(const SOFTWARESETTINGS mysetting);
    virtual void OpenLaserProcess(const SOFTWARESETTINGS mysetting);
    virtual void CloseLaser();
    virtual void laserTest(const SOFTWARESETTINGS mysetting);

signals:
    void laserError(const QString &s);
    void caseTemperature(const double T);
    void diodeTemperature(const double T);
    void emissionState(const QString &s);
    void laserCloseReady();
    void laserOk();
    void laserTestOk();
    void laserCurrentRise(int status);
    void laserFiring(int status);

private slots:
    virtual void PortError(const QString &s);
    virtual void laserReceiveResp(const QByteArray response);

public slots:
    virtual void ReadCaseTemperature();
    virtual void ReadDiodeTemperature();
    virtual void emissionStateCheck();//Read the state of emission
};

#endif // LASERCONTROL_BASE_H
